import VueRouter from 'vue-router'
//导入对应组件
import HomeContainer from '../../components/tabbar/HomeContainer.vue'
import MemberContainer from '../../components/tabbar/MemberContainer.vue'
import ShopcarContainer from '../../components/tabbar/ShopcarContainer.vue'
import SearchContainer from '../../components/tabbar/SearchContainer.vue'
import news from '../../components/news/news.vue'
import newsInfo from '../../components/news/newsInfo.vue'
import photoList from '../../components/photos/photoList.vue'
import photoInfo from '../../components/photos/photoInfo.vue'
import goodsList from '../../components/goods/goodsList.vue'
import goodsInfo from '../../components/goods/goodsInfo.vue'
import goodsDec from '../../components/goods/goodsDec.vue'
import goodsComment from '../../components/goods/goodsComment.vue'


var router = new VueRouter({
  routes:[
    {path:'/',redirect:'/home'},
    {path:'/home',component:HomeContainer},
    {path:'/member',component:MemberContainer},
    {path:'/shopcar',component:ShopcarContainer},
    {path:'/search',component:SearchContainer},
    {path:'/home/new',component:news},
    { path: '/home/newsinfo/:id', component: newsInfo },
    { path: '/home/img', component: newsInfo },
    { path: '/home/photolist', component: photoList },
    { path: '/home/photoinfo/:id', component: photoInfo },
    { path: '/home/goodsList', component: goodsList},
    { path: '/home/goodsInfo/:id', component: goodsInfo,name:'goodsInfo'},
    { path: '/home/goodsdec', component: goodsDec,name:'goodsDec'},
    { path: '/home/goodscomment', component: goodsComment,name:'goodsComment'},
  ],
  linkActiveClass:'mui-active'
})

export default router
